<?php

if(!defined('IN_DISCUZ')) {
	exit('Access Denied');
}

/**
 * 读取第$week_no周的育儿周刊
 *
 * @param int $week_no
 */
function read_article($week_no){
	$subject = '育婴周刊  怀孕第 '.$week_no.' 周注意事项';

	if ( $week_no > 40 || $week_no < 0 ){
		return array();
	}

	$email = 'static/article/weekly/'.$week_no.'.htm';
	$message = '';
	$handle = @fopen($email, "r");
	if ($handle) {
		while (($buffer = fgets($handle, 4096)) !== false) {
			$message .= $buffer;
		}

		if (!feof($handle)) {

		}
		fclose($handle);
	}

	return  array($subject, $message);
}
?>